<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libschc: schc_config.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libschc
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">schc_config.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="schc__config_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef SCHC_CONFIG_H_</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define SCHC_CONFIG_H_</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;unistd.h&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;inttypes.h&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="schc__config_8h.html#aef0780bedfc824f704b8a169d4a9bd2e">    8</a></span>&#160;<span class="preprocessor">#define CLICK                   0</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a0709fb8e6036919937aef443f7e94c77">    9</a></span>&#160;<span class="preprocessor">#define SCHC_BUFSIZE            256</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a65a515400abb0daca1623e7cb09efd1c">   11</a></span>&#160;<span class="preprocessor">#define DYNAMIC_MEMORY          0</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="schc__config_8h.html#ad0b9bf0cc9b61f111c5c12e6d1f931e2">   13</a></span>&#160;<span class="preprocessor">#define SCHC_CONF_RX_CONNS      1</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="schc__config_8h.html#abd7889c187270346009f19c2d0453190">   14</a></span>&#160;<span class="preprocessor">#define SCHC_CONF_MBUF_POOL_LEN 32</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="schc__config_8h.html#af792d439ea0fb7e7d97eb0584e6e6d2d">   16</a></span>&#160;<span class="preprocessor">#define USE_COAP                0</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a55dabc2b8b295e55081b39b6382caaa8">   17</a></span>&#160;<span class="preprocessor">#define USE_UDP                 1</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a7353ec784d9c3d7aa4b938660e00575e">   18</a></span>&#160;<span class="preprocessor">#define USE_IPv6                1</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a9d2a084ca2cdbae8d804a8786a4d983d">   20</a></span>&#160;<span class="preprocessor">#define NUMBER_OF_LAYERS        USE_COAP + USE_UDP + USE_IPv6</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">// the maximum length of a single header field</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">// e.g. you can use 4 ipv6 source iid addresses with match-mapping</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a7703530242d5d6d3884340f734fad44e">   24</a></span>&#160;<span class="preprocessor">#define MAX_FIELD_LENGTH        32</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">// maximum number of header fields present in a rule (vertical, top to bottom)</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="schc__config_8h.html#ae1b67de7a1c26318d23f1c34e89fb989">   27</a></span>&#160;<span class="preprocessor">#define IPV6_FIELDS             10</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="schc__config_8h.html#aed36719a087639bf1875b85276f09e55">   28</a></span>&#160;<span class="preprocessor">#define UDP_FIELDS              4</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="schc__config_8h.html#af1690024e8fe24a690d86ec4dd5d3bb6">   29</a></span>&#160;<span class="preprocessor">#define COAP_FIELDS             16</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="schc__config_8h.html#af199a39319b90015d86f3c3ccccf42bc">   31</a></span>&#160;<span class="preprocessor">#define MAX_HEADER_LENGTH       256</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a80b1e044dbe408bae2a894bc67a5e2c9">   33</a></span>&#160;<span class="preprocessor">#define MAX_COAP_HEADER_LENGTH  64</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a514a85c5de1504a471911a4beb143cb5">   34</a></span>&#160;<span class="preprocessor">#define MAX_PAYLOAD_LENGTH      256</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a5c09f90c937a1ef91c4b87771a5ec06c">   35</a></span>&#160;<span class="preprocessor">#define MAX_COAP_MSG_SIZE       (MAX_COAP_HEADER_LENGTH + MAX_PAYLOAD_LENGTH)</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">// the maximum transfer unit of the underlying technology</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="schc__config_8h.html#ae0c8fc6a4adb1c74c7cb4fd33c181af6">   38</a></span>&#160;<span class="preprocessor">#define MAX_MTU_LENGTH          242</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment">// the maximum number of tokens inside a JSON structure</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a4e7d67d7aea26c4f57d1098595f90662">   41</a></span>&#160;<span class="preprocessor">#define JSON_TOKENS             16</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a1560def0a5925468e7ea4e33c1f66203">   43</a></span>&#160;<span class="preprocessor">#define RULE_SIZE_BITS          8</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a5c8ef3c24dad2c469a42784a9a39403b">   45</a></span>&#160;<span class="preprocessor">#define DEBUG_PRINTF(...)       printf(__VA_ARGS__) //log_print_string(__VA_ARGS__)</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="comment">// the number of ack attempts</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a0351afa5ab231ab194e6d790a4b52fa1">   48</a></span>&#160;<span class="preprocessor">#define MAX_ACK_REQUESTS        3</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="comment">// the number of FCN bits</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="schc__config_8h.html#aeed83cfe8fb659c1f816967ab338806d">   51</a></span>&#160;<span class="preprocessor">#define FCN_SIZE_BITS           3</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment">// the number of DTAG bits</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="schc__config_8h.html#ac24f6aea575e391494ab29765ee389bf">   54</a></span>&#160;<span class="preprocessor">#define DTAG_SIZE_BITS          0</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment">// the number of bytes the MIC consists of</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="schc__config_8h.html#adfbf14de3d8d2907750758406ced72db">   57</a></span>&#160;<span class="preprocessor">#define MIC_SIZE_BYTES          4</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment">// the length of the bitmap</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="schc__config_8h.html#a5e6121b65e73cd727a9af2331bf5d897">   60</a></span>&#160;<span class="preprocessor">#define BITMAP_SIZE_BYTES       2 // pow(2, FCN_SIZE_BITS) / 8</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
